/*
 * Copyright (c)$today.year.month.day
 *  admin:郑程荣.
 *  文件名:TableDividerItemDecoration.java
 *  项目功能:
 */

/*
 * Copyright (c)$today.year.month.day
 *  admin:郑程荣.
 *  文件名:DividerItemDecoration.java
 *  项目功能:
 */

package com.jg.myproject.widget;

import android.content.Context;

import com.yanyusong.y_divideritemdecoration.Y_Divider;
import com.yanyusong.y_divideritemdecoration.Y_DividerBuilder;
import com.yanyusong.y_divideritemdecoration.Y_DividerItemDecoration;
import com.zcr.myproject.R;

/**
 * Created by llz on 2018/11/16.
 */
public class TableDividerItemDecoration extends Y_DividerItemDecoration {

    private Context mContext;
    public TableDividerItemDecoration(Context context) {
        super(context);
        this.mContext = context;
    }

    @Override
    public Y_Divider getDivider(int itemPosition) {
        Y_Divider divider = null;
            //每一行第一个显示rignt和bottom
          divider = new Y_DividerBuilder()
                    .setBottomSideLine(true,mContext.getResources().getColor(R.color.bg_division) , 1, 0, 0)
                    .setRightSideLine(true,mContext.getResources().getColor(R.color.bg_division) , 1, 0, 0)
                    .setLeftSideLine(true,mContext.getResources().getColor(R.color.bg_division) , 1, 0, 0)
                    .create();
        return divider;
    }
}
